//
//  HotCell.m
//  HomePage
//
//  Created by dlios on 15-1-28.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "HotCell.h"
#import <UIImageView+WebCache.h>
@implementation HotCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.labelTname = [[UILabel alloc] init];
        self.imageViewCover_path = [[UIImageView alloc] init];
        [self.contentView addSubview:self.labelTname];
        [self.contentView addSubview:self.imageViewCover_path];
    }
    return self;
}
//- (void)setLis:(List *)lis
//{
//    self.labelTname.text = self.lis.tname;
//    NSString *str = self.lis.cover_path;
//    NSURL *url = [NSURL URLWithString:str];
//    [self.imageViewCover_path sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"placeholder"]];
//        [self.contentView addSubview:self.imageViewCover_path];
//   
//    
//}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.imageViewCover_path.frame =  CGRectMake(0, 0,layoutAttributes.frame.size.width,layoutAttributes.frame.size.height / 1.2);
   // NSLog(@"1111111111111111111::%f",layoutAttributes.frame.size.height);
    self.labelTname.frame = CGRectMake(0, layoutAttributes.frame.size.height / 1.2, layoutAttributes.frame.size.width, layoutAttributes.frame.size.height / 6);
    self.labelTname.textAlignment = NSTextAlignmentCenter;
       self.labelTname.font = [UIFont systemFontOfSize:15];
//    self.labelTname.text = self.lis.tname;
    [self.contentView addSubview:self.labelTname];
    
    
}

@end
